The present invention generally relates to management of devices.
For example a computer system may comprise one or more storage systems and one or more servers connected with a SAN (Storage Area Network).
For example, a storage system may comprise one or more ports and a plurality of physical storage units. A plurality of logical units (LUs) are formed as logical storage units based on the storage space that is provided by this plurality of physical storage units. In a storage system, usually, LUNs (Logical Unit Numbers) corresponding to each LU are managed.
The OS (Operating System) loaded on a server may be for example a UNIX (registered trademark)-based OS (referred to hereinbelow for the sake of convenience as “UNIX”). In UNIX, for example a port of a storage system is recognized as a target and an LU is recognized as a device. In UNIX, a SCSI (Small Computer System Interface) driver determines a minor number and device filename in respect of a recognized device. The data space of the device number comprises the major space (most significant part) and minor space (least significant part). The minor number is a value represented by part (for example 16 bits) or all of the minor space (for example 20 bits).
In UNIX, a SCSI driver determines the minor number and device filename in respect of each device in the order of device recognition. Also, in UNIX, after successive recognition of one or more devices associated with one target, one or more devices associated with another target may be successively recognized. For these reasons, in a storage system, if for example UNIX (i.e. OS) rebooting or fail-over takes place after alteration of the number of targets and/or devices, the correspondence of the minor numbers and device filenames with devices may be altered.
Specifically, let us assume for example that, as shown in FIG. 1A, in a first storage system 0, a port (P00) constituting a target is present, LU0 and LU1 are associated with P00, and, in the server, UNIX can recognize P00 and LU0 and LU1 associated with P00. Also, let us assume that in a second storage system 1, a port (P10) constituting a target is present, LU0 and LU1 are associated with P10, and, in the server, UNIX can recognize P10 and LU0 and LU1 associated with P10. In such an environment, UNIX recognizes successively in for example the order LU0, LU1, a plurality of LUs associated with P00 and next recognizes successively in for example the order LU0, LU1 a plurality of LUs associated with P10. In this case, since the LU0 associated with P10 is the third to be recognized, its minor number is determined as “2” (minor: 2 means that the minor number is “2”), and its device filename is determined as the value “/dev/sdc”, corresponding to being the third to be recognized.
Let us assume that, after this, for example as shown in FIG. 1B, in the storage system 0, LU2 is added as an LU associated with P00, and, thereafter, UNIX is rebooted. If this done, if the LUs are recognized by the same procedure as in the case of FIG. 1A, the added LU2 will be the third to be recognized, so that the LU0 associated with P10 will be the fourth to be recognized. Consequently, as shown in FIG. 1B, as the minor number of the LU0 associated with P10, “3” will be determined, indicating that this is the fourth to be recognized, and, as the device filename, the value “/dev/sdd” corresponding to being the fourth to be recognized will be determined. In other words, referring to the LU0 associated with P10, the corresponding minor number and device filename before and after the addition of LU2 will be altered from minor number “2” and device filename “/dev/sdc” to minor number “3” and device filename “/dev/sdd”.
Likewise, in for example the environment shown in FIG. 1B, in the case where UNIX is rebooted after access of LU2 associated with P00 has become impossible due for example to malfunction, an environment is produced as shown in FIG. 1A, so, in this case also, the correspondence of the minor numbers and device filenames with the devices is altered.
When the correspondence of the minor numbers and device filenames with the devices is altered in this way, the problem arises that it will not necessarily be possible to access the same device (for example, a different device will be mounted in respect of the same minor number and device filename, or mounting will fail). Consequently, when for example a client transmits an access request designating a device filename corresponding to a desired device to a server, at the server, UNIX will transmit an access request specifying the LU corresponding to this device filename, but, as described above, since the correspondence has been altered, either a different LU will be accessed before and after the alteration of correspondence, or access may fail.
Methods of fixing the correspondence with the device in respect of a device filename are known (see for example Laid-open US Patent Application No. 2004/0064459). According to Laid-open US Patent Application No. 2004/0064459, a correspondence table is prepared in which there are recorded serial numbers or the like and device filenames respectively corresponding to all the devices; when the serial number or the like of a device is acquired by a SCSI inquiry command, the device filename corresponding to this serial number or the like is searched for in this correspondence table: if the device filename is then found, this filename is associated with the device.
Although the above Laid-open US Patent Application No. 2004/0064459 discloses a method of fixing the correspondence between device filenames and devices, no method at all has been disclosed of fixing the correspondence between the minor number of the device number and a device. In some cases, UNIX may receive a request designating the device number rather than the device filename. In such cases, a problem as described above may arise.
Also, in the above Laid-open US Patent Application No. 2004/0064459, a correspondence table is required that records the serial number or the like and device filename in respect of all of the devices present in a storage system. Depending on for example the scale and number of devices of a storage system, there may be a large number of devices (for example a few thousands to a few tens of thousands). In such cases, the size of the correspondence table becomes large, and the load of searching for the device filename corresponding to a serial number or the like becomes high.
Such problems occur not merely in respect of minor numbers but in any environment in which management is conducted with device identifying values different from the device filenames associated with the devices.